package cn.wolfcode.service.impl;

import cn.wolfcode.domain.Business;
import cn.wolfcode.mapper.BusinessMapper;
import cn.wolfcode.mapper.BusinessReportMapper;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.service.IBusinessReportService;
import cn.wolfcode.service.IBusinessService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class BusinessReportServiceImpl implements IBusinessReportService {

    @Autowired
    private BusinessReportMapper businessReportMapper;

    @Override
    public PageInfo<HashMap> selectReport(QueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<HashMap> map = businessReportMapper.selectReport(qo);
        return new PageInfo<>(map);

    }

}
